/*
 * Contains the information about the note & methods to
 * access the database to get/set the note
 */
package Models;

public class Note {
	public static final int EMPTY_NOTE = 0;
	
	
	private String idNote;
	private String idRecipe;
	private String stage;
	private String note;
	/**
	 * @return the idNote
	 */
	public String getIdNote() {
		return idNote;
	}
	/**
	 * @return the idRecipe
	 */
	public String getIdRecipe() {
		return idRecipe;
	}
	/**
	 * @return the stage
	 */
	public String getStage() {
		return stage;
	}
	/**
	 * @return the note
	 */
	public String getNote() {
		//if note isn't stored, go to database, then store note
		//NEEDS TO ACCESS DATABASE TO GET THE NOTE  TODO
		return null;
	}
	/**
	 * @param idNote the idNote to set
	 */
	public void setIdNote(String idNote) {
		this.idNote = idNote;
	}
	/**
	 * @param idRecipe the idRecipe to set
	 */
	public void setIdRecipe(String idRecipe) {
		this.idRecipe = idRecipe;
	}
	/**
	 * @param stage the stage to set
	 */
	public void setStage(String stage) {
		this.stage = stage;
	}
	/**
	 * Saves an existing note
	 * @param note the note to set
	 */
	public void saveNote(String note) {
		
		//TODO NEEDS TO ACCESS DATABASE & SET THE NOTE

	}
	
	/**
	 * Creates a new note in the database
	 * returns the new note
	 */
	public static Note createNote(final String idRecipe, final String stage, final String note) {
		//TODO NEEDS TO ACCESS DATABASE TO CREATE NEW NOTE
		return null;
	}
	
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("idNote: ");
		sb.append(this.getIdNote());
		sb.append("idRecipe: ");
		sb.append(this.getIdNote());
		return sb.toString();
	}
}
